// TypeScript 对传入的函数类型的参数个数不进行检测
type CalcType = (num1: number, num2: number) => number

function calc(calcFn: CalcType) { }
calc(function () { return 123 })

// forEach例子
const names = ["abc", "cba", "nba"]
names.forEach(function (item, index, array) {})
names.forEach(function (item) { })


//Ts对于很多类型的检测报不报错,取决于它的内部规则

interface IPerson{
  name:string
  age:number
}
const p = {
  name:"why",
  age: 18,
  height:1.88,
  address: "广州市"
}
const info: IPerson = p

export { }